package org.ipms.c.common.persistence.mybaits;

import java.io.Serializable;
import java.util.List;
import org.ipms.c.common.persistence.web.RequestHead;

public class BaseQO<T> implements Serializable {

	private static final long serialVersionUID = 1L;

	private RequestHead head;

	/**
	 * 实体ID
	 */
	private T id;
	/**
	 * 实体ID集合，设置后会进行in查询
	 */
	private List<T> ids;

	/**
	 * 不包含的ID集合，设置后会进行not in查询
	 */
	private T[] idNotIn;

	// 分页条件
	private Integer pageNo = 1;

	private Integer pageSize = 10;

	private Integer offset = 0;

	/**
	 * 读锁
	 */
	private boolean readLock;

	/**
	 * 写锁
	 */
	private boolean writeLock;

	public RequestHead getHead() {
		return head;
	}

	public void setHead(RequestHead head) {
		this.head = head;
	}

	public T getId() {
		return id;
	}

	public void setId(T id) {
		this.id = id;
	}

	public List<T> getIds() {
		return ids;
	}

	public void setIds(List<T> ids) {
		this.ids = ids;
	}

	public T[] getIdNotIn() {
		return idNotIn;
	}

	public void setIdNotIn(T[] idNotIn) {
		this.idNotIn = idNotIn;
	}

	public Integer getPageNo() {
		return pageNo;
	}

	public void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getOffset() {
		return offset;
	}

	public void setOffset(Integer offset) {
		this.offset = offset;
	}

	public boolean isReadLock() {
		return readLock;
	}

	public void setReadLock(boolean readLock) {
		this.readLock = readLock;
	}

	public boolean isWriteLock() {
		return writeLock;
	}

	public void setWriteLock(boolean writeLock) {
		this.writeLock = writeLock;
	}

}